IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'RealmInsert')
	BEGIN
		DROP  Procedure  RealmInsert
	END

GO

CREATE Procedure RealmInsert
@SagaID Int,
@CreatorID Int,
@Title VarChar(300),
@Summary NText,
@Description NText,
@ParentID Int,
@IsPrivate Bit
AS
Insert Into Realm
(SagaID,
 CreatorID,
  Title,
  Summary,
  Description,
  ParentID,
  IsPrivate,
  CreatedDate,
  ModifiedDate)
  Values
  (
	@SagaID,
	@CreatorID,
	@Title,
	@Summary,
	@Description,
	@ParentID,
	@IsPrivate,
	GetDate(),
	GetDate())
  return SCOPE_IDENTITY()

  

GO
